{template "content","header"}
<script type="text/javascript" src="{JS_PATH}formvalidator.js" charset="UTF-8"></script> 
<script type="text/javascript" src="{JS_PATH}formvalidatorregex.js" charset="UTF-8"></script>
<link href="{CSS_PATH}guestbook.css" rel="stylesheet" type="text/css" />
<link href="{CSS_PATH}table_form.css" rel="stylesheet" type="text/css" /> 
<!--main-->
<div id="main">

    <!-- Breads -->
    <div class="stm_breadcrumbs_unit">
        <div class="container">
            <div class="navxtBreads">
                <!-- Breadcrumb NavXT 5.3.0 -->
                <span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="首页" href="/" class="home"><span property="name">首页</span></a>
          <meta property="position" content="1">
          </span> &gt; <span property="itemListElement" typeof="ListItem"><span property="name">报名中心</span>
          <meta property="position" content="2">
          </span> &gt; <span property="itemListElement" typeof="ListItem"><span property="name">{$type_arr[name]}</span>
          <meta property="position" content="2">
          </span> </div>
        </div>
    </div>
    <div class="container">

        <div class="vc_row wpb_row vc_row-fluid">
            <div class="wpb_column vc_column_container vc_col-sm-12">
                <div class="vc_column-inner ">
                    <div class="wpb_wrapper">

                                <!--left_bar-->
                                <div class="col-liuyanban">
                                        <form action="{APP_PATH}index.php?m=guestbook&c=index&a=register&siteid={$siteid}" method="post" name="myform" id="myform">
                                            <table cellspacing="1" cellpadding="0" class="table_form ltable">
                                                <tbody>
                                                <tr>
                                                    <th width="20%">姓　　名：</th>
                                                    <td><input type="text" value="" id="name" name="name" class="input-text" onkeyup="value="/oblog/value.replace(/[^\u4E00-\u9FA5]/g,'')></td>
                                                </tr>
                                                <tr>
                                                    <th>性　　别：</th>
                                                    <td><input type="radio" value="男" name="sex" checked="checked"/> 男<input type="radio" value="女" name="sex"/> 女</td>
                                                </tr>
                                                <tr>
                                                    <th>联 系QQ：</th>
                                                    <td><input type="text" size="40" value="" name="lxqq" id="lxqq" class="input-text"></td>
                                                </tr>
                                                <th>电子邮箱：</th>
                                                <td><input type="text" size="40" value="" name="email" id="email" class="input-text"></td>
                                                </tr>
                                                <tr>
                                                    <th>手　　机：</th>
                                                    <td><input type="text" size="40" value="" name="shouji" id="shouji" class="input-text" maxlength="11"></td>
                                                </tr>
                                                <tr>
                                                    <th>所属分类：</th>
                                                    <td width="300">
                                                        <select  style="width: 36%;" id="typeid" name="typeid">
                                                            <option value="0">默认分类</option>
                                                            {loop $types $type_arr}
                                                            <option value="{$type_arr['typeid']}">{$type_arr['name']}</option>
                                                            {/loop}
                                                        </select>
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <th>填写留言：</th>
                                                    <td><textarea name="introduce" cols="40" rows="5" class="input-text" id="introduce" style='width:500px;height:70px;'></textarea></td>
                                                </tr>
                                                {if $setting[1]['enablecheckcode']=='1'}
                                                <tr>
                                                    <th>验证码：</th>
                                                    <td><input name="code" type="text" id="code" size="10"  class="input-text"/> {form::checkcode('code_img','4','14',110,30)}</td>
                                                </tr>
                                                {/if}
                                                <tr>
                                                    <th></th>
                                                    <td><input type="submit" value=" 提 交 " name="dosubmit" class="button">　　<input type="reset" value=" 取 消 " name="reset" class="button"> </td>
                                                </tr>
                                                </tbody></table>
                                        </form>

                                </div>
                                <!--right_bar-->
                    </div>
                </div>
            </div>
        </div>

        <div class="clearfix"> </div>
    </div>
</div>




<script type="text/javascript">
<!--
	$(function(){
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$("#name").formValidator({onshow:"请输入姓名",onfocus:"请输入姓名"}).inputValidator({min:4,max:10,onerror:"姓名应该为2-3个汉字"}).regexValidator({regexp:"ps_username",datatype:"enum",onerror:"姓名格式错误"});
	
	$("#email").formValidator({onshow:"请输入电子邮箱",onfocus:"请输入电子邮箱",oncorrect:"邮箱格式正确"}).inputValidator({min:6,max:32,onerror:"邮箱应该为6-32位之间！"}).regexValidator({regexp:"email",datatype:"enum",onerror:"请填写正确的邮箱地址"});
	
	$("#lxqq").formValidator({onshow:"请输入QQ号码",onfocus:"请输入QQ号码",oncorrect:"QQ格式正确"}).inputValidator({min:5,max:10,onerror:"QQ号码应该为5-10位之间！"}).regexValidator({regexp:"qq",datatype:"enum",onerror:"请填写正确的QQ号"});
	
	$("#shouji").formValidator({onshow:"请输入手机",onfocus:"请输入联系电话",oncorrect:"电话格式正确"}).inputValidator({min:11,max:11,onerror:"手机应该为11位数！"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"请填写正确的手机"});
	$("#introduce").formValidator({onshow:"请输入留言内容",onfocus:"请输入留言内容"}).inputValidator({min:10,max:200,onerror:"10-100个字之间"});
	
 	$("#code").formValidator({onshow:"请输入验证码",onfocus:"验证码不能为空"}).inputValidator({min:1,max:999,onerror:"验证码不能为空"}).ajaxValidator({
	    type : "get",
		url : "",
		data :"m=pay&c=deposit&a=public_checkcode",
		datatype : "html",
		async:'false',
		success : function(data){	
            if(data == 1)
			{
                return true;
			}
            else
			{
                return false;
			}
		},
		buttons: $("#dosubmit"),
		onerror : "验证码错误",
		onwait : "验证中"
	});
 	})
//-->
</script>
{template "content","footer"}
